import request from '@/utils/request'

// 查询重大危险源列表
export function listHazard(query) {
  return request({
    url: '/basic/hazard/list',
    method: 'get',
    params: query
  })
}

// 查询重大危险源详细
export function getHazard(id) {
  return request({
    url: '/basic/hazard/' + id,
    method: 'get'
  })
}

// 新增重大危险源
export function addHazard(data) {
  return request({
    url: '/basic/hazard',
    method: 'post',
    data: data
  })
}

// 修改重大危险源
export function updateHazard(data) {
  return request({
    url: '/basic/hazard',
    method: 'put',
    data: data
  })
}

// 删除重大危险源
export function delHazard(id) {
  return request({
    url: '/basic/hazard/' + id,
    method: 'delete'
  })
}
